From 235480bd9ccd1b89fa47e55040c311a9e63aa714 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 22 Sep 2008 18:32:31 +0000 Subject: [PATCH] =?utf8?q?Bug=20553135=20=E2=80=93=20eog=20crash:=20assert?= =?utf8?q?ion=20failed.=20Gtk=20error:?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-09-22 Matthias Clasen Bug 553135 – eog crash: assertion failed. Gtk error: shortcuts_remove_rows: code should not be reached * gtk/gtkfilechooserdefault.c: Disconnect from GtkFileSystem signals when we are destroyed, in order to avoid nasty surprises. Patch by Claudio Saavedra svn path=/trunk/; revision=21492 --- ChangeLog | 9 +++++++++ gtk/gtkfilechooserdefault.c | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index eeed61e9b8..e3591e6045 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Matthias Clasen + + Bug 553135 – eog crash: assertion failed. Gtk error: + shortcuts_remove_rows: code should not be reached + + * gtk/gtkfilechooserdefault.c: Disconnect from GtkFileSystem + signals when we are destroyed, in order to avoid nasty surprises. + Patch by Claudio Saavedra + 2008-09-22 Emmanuele Bassi Bug 552789 – Show size column in the search and recently used diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index b1c5fa64b4..34e9949915 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -455,6 +455,7 @@ static void recent_get_valid_child_iter (GtkFileChooserDefault *impl, GtkTreeIter *child_iter, GtkTreeIter *iter); static void set_file_system_backend (GtkFileChooserDefault *impl); +static void unset_file_system_backend (GtkFileChooserDefault *impl); @@ -923,6 +924,8 @@ gtk_file_chooser_default_finalize (GObject *object) GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (object); GSList *l; + unset_file_system_backend (impl); + if (impl->shortcuts_pane_filter_model) g_object_unref (impl->shortcuts_pane_filter_model); @@ -5404,6 +5407,17 @@ set_file_system_backend (GtkFileChooserDefault *impl) profile_end ("end", NULL); } +static void +unset_file_system_backend (GtkFileChooserDefault *impl) +{ + g_signal_handlers_disconnect_by_func (impl->file_system, + G_CALLBACK (volumes_bookmarks_changed_cb), impl); + + g_object_unref (impl->file_system); + + impl->file_system = NULL; +} + /* This function is basically a do_all function. * * It sets the visibility on all the widgets based on the current state, and -- 2.30.2